package com.zwz.service;

import com.zwz.entity.EnterpriseInfo;
import com.zwz.voObject.EnterpriseBean;
import com.zwz.voObject.EnterpriseDetailVO;
import com.github.pagehelper.PageInfo;
import com.zwz.voObject.QueryConditionVO;

import java.util.List;
import java.util.Map;

public interface EnterpriseService {
    EnterpriseInfo getById(Long id);
    List<EnterpriseInfo> getAll();
    int create(EnterpriseInfo enterprise);
    int update(EnterpriseInfo enterprise);
    int delete(Long id);
    EnterpriseDetailVO getEnterpriseDetail(Long id);

    List<EnterpriseBean> getEnterpriseBean();

    /**
     * 分页获取企业信息
     *
     * @param pageNum  页码
     * @param pageSize 每页大小
     * @return 分页结果
     */
    PageInfo<EnterpriseBean> getEnterpriseBeanPage(Integer pageNum, Integer pageSize, String companyName);

    PageInfo<EnterpriseBean> getEnterpriseBeanPageByCompanyType(Integer pageNum, Integer pageSize, String companyType);

    PageInfo<EnterpriseBean> getEnterpriseBeanPageByDate(Integer pageNum, Integer pageSize, String startDate, String endDate);

    PageInfo<EnterpriseBean> getEnterpriseBeanPageByStatus(Integer pageNum, Integer pageSize, String businessStatus);


    // 逻辑值查询
    List<Map<String, Object>> queryByBoolean(QueryConditionVO condition, Integer pageNum, Integer pageSize);

    Long countByBoolean(QueryConditionVO condition);

    // 整数区间查询
    List<Map<String, Object>> queryByInteger(QueryConditionVO condition, Integer pageNum, Integer pageSize);

    Long countByInteger(QueryConditionVO condition);

    // 浮点数区间查询
    List<Map<String, Object>> queryByFloat(QueryConditionVO condition, Integer pageNum, Integer pageSize);
    Long countByFloat(QueryConditionVO condition);

    // 字符串包含查询
    List<Map<String, Object>> queryByString(QueryConditionVO condition, Integer pageNum, Integer pageSize);
    Long countByString(QueryConditionVO condition);

    // 日期区间查询
    List<Map<String, Object>> queryByDate(QueryConditionVO condition, Integer pageNum, Integer pageSize);

    Long countByDate(QueryConditionVO condition);

    // 枚举值查询
    List<Map<String, Object>> queryByEnum(QueryConditionVO condition, Integer pageNum, Integer pageSize);

    Long countByEnum(QueryConditionVO condition);

    // 通用查询
    List<Map<String, Object>> queryGeneral(QueryConditionVO condition, Integer pageNum, Integer pageSize, Integer type);

    Long countGeneral(QueryConditionVO condition, Integer type);
}